-- GENERATED SPELL FOR [Cyrukh the Firelord] --


function spell0_21181(pUnit, Event) --@Fel Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(39429,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21181', 8000, 1)
end

function spell1_21181(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(18945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21181', 590, 1)
end

function spell2_21181(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(39425,pUnit)
pUnit:RegisterEvent('Sorts_21181', 579, 1)
end

function Sorts_21181(pUnit, Event)
local choix_sorts_21181 = math.random(0, 2)
if choix_sorts_21181 == 0 then
pUnit:RegisterEvent('spell0_21181', 1, 1)
end
if choix_sorts_21181 == 1 then
pUnit:RegisterEvent('spell1_21181', 1, 1)
end
if choix_sorts_21181 == 2 then
pUnit:RegisterEvent('spell2_21181', 1, 1)
end
end

function mob21181_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21181', math.random(1500, 3000), 1)
end

function mob21181_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21181_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21181_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21181, 1, 'mob21181_Action')
RegisterUnitEvent(21181, 2, 'mob21181_Leave')
RegisterUnitEvent(21181, 3, 'mob21181_Kill')
RegisterUnitEvent(21181, 4, 'mob21181_Die')
